
package me.zhengjie.dto.sqlServer;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;

/**
* @website https://eladmin.vip
* @description /
* @author ZhangYY
* @date 2024-01-19
**/
@Entity
@Data
@Table(name="in_bound_station")
public class InBoundStation implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`id`")
    @ApiModelProperty(value = "id")
    private Integer id;

    @Column(name = "`station_code`")
    @ApiModelProperty(value = "stationCode")
    private String stationCode;

    @Column(name = "`plc_id`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "plcId")
    private Integer plcId;

    @Column(name = "`reservoir_area_id`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "reservoirAreaId")
    private Integer reservoirAreaId;

    @Column(name = "`device_code`")
    @ApiModelProperty(value = "码垛机编码")
    private String deviceCode;

    public void copy(InBoundStation source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
